{% extends "master.html" %}
{% block content %}
{% if GradeCount > 0 %}
      <h2>Your Grades</h2>
    <table width="100%">
        <tr>
            <td><b>Exam</b></td>
            <td><b>Grade</b></td>
            <td><b>Average</b></td>
            <td><b>Your Grade</b></td>
            <td><b>Average Grade</b></td>
        </tr>
    {% for grade in all%}
        <tr></tr>
        <tr>
        {% if grade.username == user.username %}
            <td>{{ grade.name }}</td>
            <td>{{ grade.grade|floatformat }}</td>
            <td>{{ grade.average|floatformat }}</td>
            <td><meter min="0" max="10" value="{{ grade.grade }}"></meter></td>
            <td><meter min="0" max="10" value="{{ grade.average }}"></meter></td>
        {% endif %}
        </tr>

    {% endfor %}
    </table>

        <p><b>Average: {{ Average_my_grades|floatformat }}</b></p>
{% else %}
        You have no grades, man!
{% endif %}
{% endblock %}